package com.example.day01.adapter;

import android.widget.ImageView;

import androidx.annotation.Nullable;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.day01.R;
import com.example.day01.bean.XiaBean;

import java.util.List;

public class XiaAdapter  extends BaseQuickAdapter<XiaBean.DataBean, BaseViewHolder> {
    public XiaAdapter(int layoutResId, @Nullable List<XiaBean.DataBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, XiaBean.DataBean item) {
        helper.setText(R.id.tv_xia,item.getTitle()+"");
        Glide.with(mContext).load(item.getPic()).into((ImageView) helper.getView(R.id.iv_xia));


    }
}
